package fag.core.game.test.arkanoid;

import fag.core.game.Scene;
import fag.core.game.Transformable.Referential;
import fag.core.game.test.arkanoid.Block.Type;

public abstract class LevelManager {
	
	public static final int FINAL_LEVEL = 1;
	public static void buildLevel(Arkanoid game, Scene scene, int level) {
		
		switch(level) {
		case 1:			
			for(int i = 0; i < 19; i++) {
				for(int j = 0; j < 5; j++) {
					Type color;
					switch(j) {
					case 0:
						color = Type.Blue;
						break;
					case 2:
						color = Type.Orange;
						break;
					case 4:
						color = Type.Red;
						break;
					default:
						color = Type.White;
						break;
					}
					Block block = new Block(color);
					game.getBlocks().add(block);
					scene.addDoodad(block);
					block.translate( 5 + i * 31, Arkanoid.GAME_HEIGHT + 80+ j * 16, Referential.ABSOLUTE);
				}
			}
			break;
		default:
		}
	}
}
